home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / ODUtils / StdTypIO.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-17  |  5.9 KB  |  189 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StdTypIO.h
  3.  
  4.     Contains:    functions for read/writing standard typed values from/to storage units
  5.  
  6.     Owned by:    Tantek Çelik
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.         
  10.     Change History (most recent first):
  11.  
  12.          <2>     5/24/96    jpa        1.1MRD: pragma internal
  13.  
  14. */
  15.  
  16. #ifndef _STDTYPIO_
  17. #define _STDTYPIO_
  18.  
  19.  
  20. #ifndef _ODTYPES_
  21. #include <ODTypes.h>
  22. #endif
  23.  
  24. //==============================================================================
  25. // Classes used by this interface
  26. //==============================================================================
  27.  
  28. #ifdef __cplusplus
  29.     class    ODStorageUnit;
  30.     class    ODTypeList;
  31. #else
  32.     #ifndef SOM_ODStorageUnit_h
  33.     #include <StorageU.h>
  34.     #endif
  35. #endif
  36.  
  37. //==============================================================================
  38. // Function prototypes
  39. //==============================================================================
  40.  
  41. #ifdef _OD_IMPL_SHARE_UTILS_
  42. #pragma import on
  43. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  44. #pragma internal on
  45. #endif
  46.  
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50.  
  51. ODBoolean    ODGetBooleanProp(Environment* ev,
  52.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  53. void        ODSetBooleanProp(Environment* ev,
  54.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  55.                 ODBoolean value);
  56.  
  57. ODUShort    ODGetUShortProp(Environment* ev,
  58.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  59. void        ODSetUShortProp(Environment* ev,
  60.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  61.                 ODUShort value);
  62.  
  63. ODSShort    ODGetSShortProp(Environment* ev,
  64.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  65. void        ODSetSShortProp(Environment* ev,
  66.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  67.                 ODSShort value);
  68.  
  69. ODULong        ODGetULongProp(Environment* ev,
  70.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  71. void        ODSetULongProp(Environment* ev,
  72.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  73.                 ODULong value);
  74.  
  75. ODSLong        ODGetSLongProp(Environment* ev,
  76.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  77. void        ODSetSLongProp(Environment* ev,
  78.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  79.                 ODSLong value);
  80.  
  81. ODISOStr    ODGetISOStrProp(Environment* ev,
  82.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  83.                 ODISOStr value, ODULong* size);
  84. void        ODSetISOStrProp(Environment* ev,
  85.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  86.                 ODISOStr value);
  87.  
  88. void        ODGetTypeListProp(Environment* ev,
  89.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  90.                 ODTypeList* typeList);
  91. void        ODSetTypeListProp(Environment* ev,
  92.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  93.                 ODTypeList* typeList);
  94.  
  95. // ODGetITextProp works as follows: the value returned is that of the
  96. // name param passed in if name is not null.  If name is null, a structure of
  97. // the necessary size is allocated.
  98.  
  99. ODIText*    ODGetITextProp(Environment* ev,
  100.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  101.                 ODIText* name);
  102. void        ODSetITextProp(Environment* ev,
  103.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  104.                 ODIText* name);
  105.  
  106. ODTime        ODGetTime_TProp(Environment* ev,
  107.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  108. void        ODSetTime_TProp(Environment* ev,
  109.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  110.                 ODTime value);
  111.  
  112. ODPoint*    ODGetPointProp(Environment* ev,
  113.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  114.                 ODPoint* value);
  115. void        ODSetPointProp(Environment* ev,
  116.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  117.                 ODPoint* value);
  118.  
  119. ODRect*        ODGetRectProp(Environment* ev,
  120.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  121.                 ODRect* value);
  122. void        ODSetRectProp(Environment* ev,
  123.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  124.                 ODRect* value);
  125.  
  126. ODID        ODGetStrongSURefProp(Environment* ev,
  127.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  128. void        ODSetStrongSURefProp(Environment* ev,
  129.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  130.                 ODID id);
  131.  
  132. ODID        ODGetWeakSURefProp(Environment* ev,
  133.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val);
  134. void        ODSetWeakSURefProp(Environment* ev,
  135.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  136.                 ODID id);
  137.  
  138. ODPolygon*    ODGetPolygonProp(Environment* ev,
  139.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  140.                 ODPolygon* value);
  141. void        ODSetPolygonProp(Environment* ev,
  142.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  143.                 const ODPolygon* value);
  144.  
  145. ODMatrix*    ODGetMatrixProp(Environment* ev,
  146.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  147.                 ODMatrix* value);
  148. void        ODSetMatrixProp(Environment* ev,
  149.                 ODStorageUnit* su, ODPropertyName prop, ODValueType val,
  150.                 ODMatrix* value);
  151.  
  152. //--------------------------------------------------------------------
  153. // Icon Family I/O
  154. //--------------------------------------------------------------------
  155.  
  156. // Note: ODIconFamily is a platform specific type, so these two functions
  157. // will have platform specific implementations. -TÇ
  158.  
  159. enum {                            // For use with iconMask parameter:
  160.     kAllIconsMask     = 0xFFFFFFFF,    // All icons usable on this platform
  161.     kBWIconsMask      = 0x0421        // 1 bit deep, 16,32,64 pixels wide
  162. };
  163.  
  164. /*    Expected values for the ODValueType begin with "OpenDoc:Type:IconFamily:"
  165.     followed by the name of a platform. These are defined in StdTypes.idl as
  166.     kODIconFamilyMac, kODIconFamilyWin, kODIconFamilyOS2, kODIconFamilyAIX, etc.
  167.     If you only specify kODIconFamily, the current platform's type will be used.
  168. */
  169.  
  170. ODIconFamily    ODGetIconFamilyProp(Environment* ev,
  171.                     ODStorageUnit* su, ODPropertyName prop, 
  172.                     ODValueType val, ODULong iconMask);
  173. void            ODSetIconFamilyProp(Environment* ev,
  174.                     ODStorageUnit* su, ODPropertyName prop, 
  175.                     ODValueType val, ODIconFamily iconFamily,
  176.                     ODBoolean deleteOtherPlatformIcons);
  177.  
  178. #ifdef __cplusplus
  179. } /* extern "C" */
  180. #endif
  181.  
  182. #ifdef _OD_IMPL_SHARE_UTILS_
  183. #pragma import off
  184. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  185. #pragma internal reset
  186. #endif
  187.  
  188. #endif // _STDTYPIO_
  189.